package examples.distributedsession;

import java.io.Serializable;

/**
 * @author Bill
 * @version 2013-05-28
 */
public class SessionMeta implements Serializable {

    public SessionMeta() {
        this.createTime = System.currentTimeMillis();
        this.lastAccessTime = this.createTime;
        this.validate = true;
    }

    private String id;

    /**session的创建时间*/
    private Long createTime;

    /**session的最大空闲时间*/
    private Long maxIdle;

    /**session的最后一次访问时间*/
    private Long lastAccessTime;

    /**是否可用*/
    private Boolean validate = false;

    /**当前版本*/
    private int version = 0;

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public Long getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Long createTime) {
        this.createTime = createTime;
    }

    public Long getMaxIdle() {
        return maxIdle;
    }

    public void setMaxIdle(Long maxIdle) {
        this.maxIdle = maxIdle;
    }

    public Long getLastAccessTime() {
        return lastAccessTime;
    }

    public void setLastAccessTime(Long lastAccessTime) {
        this.lastAccessTime = lastAccessTime;
    }

    public Boolean getValidate() {
        return validate;
    }

    public void setValidate(Boolean validate) {
        this.validate = validate;
    }

    public int getVersion() {
        return version;
    }

    public void setVersion(int version) {
        this.version = version;
    }
}
